home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 December / Chip_2001-12_cd1.bin / zkuste / tuning / download / xteq / setup.exe / {app} / plugins / XQ Startmenu Special Folders 1.xpl < prev    next >
Text File  |  2000-09-02  |  3KB  |  100 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="6"
  3. "COUNT"="4"
  4. "UIPATH"="Appearance\Start menu\Cascaded Items"
  5. "NAME"="Special Folders #1"
  6. "VERSION"="1.10"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Show cascading "Control Panel" in Start menu"
  9. "TEXT 2"="Show cascading "Printers" in Start menu"
  10. "TEXT 3"="Show cascading "Recycle Bin" in Start menu"
  11. "TEXT 4"="Show cascading "Scheduled Tasks" in Start menu"
  12. "DESCRIPTION 1"="Use this plug-in to show some of the "special" folder of Window in cascading menu so you can easily access them."
  13. "AUTHOR"="Xteq Systems"
  14. "CONTACTURL"="http://www.xteq.com"
  15. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  16. "COMMENT 1"=" "
  17.  
  18.  
  19. 'Declaration of some constants
  20. sP="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Start Menu"
  21. sPath=""
  22.  
  23.   sV1="Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
  24.        sV2="Printers.{2227A280-3AEA-1069-A2DE-08002B30309D}"
  25.     sV3="Recycle Bin.{645FF040-5081-101B-9F08-00AA002F954E}"
  26. sV4="Scheduled Tasks.{D6277990-4C6A-11CF-8D87-00AA0060F5BF}"
  27.  
  28. 'Called when the Plugin is started
  29. SUB Plugin_Initialize 
  30.  sPath=RegReadValue(sP)
  31.  if FolderExists(sPath) then
  32.     if right(sPath,1)<>"\" then sPath=sPath & "\"
  33.  
  34.  
  35.     if FolderExists(sPath & sV1) then SetUIElement 1,true
  36.     if FolderExists(sPath & sV2) then SetUIElement 2,true
  37.     if FolderExists(sPath & sV3) then SetUIElement 3,true
  38.     if FolderExists(sPath & sV4) then SetUIElement 4,true
  39.  else
  40.     Disable
  41.  end if
  42. END SUB
  43.  
  44. 'Called when the Plugin should validate the Data the user has entered
  45. SUB Plugin_CheckData(ElementIndex)
  46. END SUB
  47.  
  48. 'Called when the Plugin should apply the changes
  49. SUB Plugin_Apply(ElementIndex,ElementSubIndex) 
  50.  b=GetUIElement(1)
  51.  if b=true then
  52.     if FolderExists(sPath & sV1)=false then     
  53.        Call FolderCreate(sPath & sV1)
  54.     end if
  55.  else
  56.     if FolderExists(sPath & sV1)=true then
  57.        FolderDelete(sPath & sV1)
  58.     end if
  59.  end if
  60.  
  61.  b=GetUIElement(2)
  62.  if b=true then
  63.     if FolderExists(sPath & sV2)=false then
  64.        Call FolderCreate(sPath & sV2)
  65.     end if
  66.  else
  67.     if FolderExists(sPath & sV2)=true then
  68.        FolderDelete(sPath & sV2)
  69.     end if
  70.  end if
  71.  
  72.  b=GetUIElement(3)
  73.  if b=true then
  74.     if FolderExists(sPath & sV3)=false then
  75.        Call FolderCreate(sPath & sV3)
  76.     end if
  77.  else
  78.     if FolderExists(sPath & sV3)=true then
  79.        FolderDelete(sPath & sV3)
  80.     end if
  81.  end if
  82.  
  83.  b=GetUIElement(4)
  84.  if b=true then
  85.     if FolderExists(sPath & sV4)=false then
  86.        Call FolderCreate(sPath & sV4)
  87.     end if
  88.  else
  89.     if FolderExists(sPath & sV4)=true then
  90.        FolderDelete(sPath & sV4)
  91.     end if
  92.  end if
  93.  
  94. END SUB
  95.  
  96.  
  97. 'Called when the Plugin is about to be removed from memory
  98. SUB Plugin_Terminate
  99. END SUB
  100.